


confi.inter2=function(fittedModel){
    covr=fittedModel@covr
	ncol=length(covr)+1
	object=attr(fittedModel,"re.ppm")
	beta=coef(object)
	par=c(fittedModel@parameters$sigma2@value,fittedModel@parameters$alpha@value)
	nu=fittedModel@nu
	acacov=vcov.kppm(object,par=par,nu=nu)
	#if(any(diag(acacov)<0)) {
		#print(par)
		#browser()
	#}

	pval=2*(1-pnorm(abs(beta/sqrt(diag(acacov)))))
	for (i in 2:ncol){
		fittedModel@parameters[[i]]@pvalue=pval[i]
	}
	return(fittedModel)
}